<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>CHK Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">CHK Instruction<BR>
<hr noshade>
</h1>
<BR>
<span class="text">CHecK register against bounds. Is often used in high level languages to check if variables are in range. The lowest 16 bits of a data register are compared with an effective address. If the result is less than 0 (if bit 15 is 1) or greater than the limit, the result will be a CHK-interrupt.<BR>
  <BR>
  ADDRESS METHODS: Dn, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x(PC), x(PC,xr.s), #x<BR>
  <BR>
DATA LENGTH: Word</span></P>
  <br>
  <br>          
  <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
            <TBODY>
              <TR>
                <TD width="8%" rowSpan=5 vAlign=top class="text">FLAGS: </TD>
                <TD width="92%" class="text">X - U</TD>
              </TR>
              <TR>
                <TD width="92%" class="text">N - Set if the data register is less than zero, cleared if the data register is greater than the higher limit. Else undefined.</TD>
              </TR>
              <TR>
                <TD width="92%" class="text">Z - U</TD>
              </TR>
              <TR>
                <TD width="92%" class="text">C - U</TD>
              </TR>
              <TR>
                <TD width="92%" class="text">V - U</TD>
              </TR>
            </TBODY>
</TABLE>
          <P align=left><span class="text">SYNTAX: CHK &lt;ea&gt;,Dn<BR>
          </span></P>
          <P>&nbsp;</P>
<h1 class="heading"><span class="text">
  
  </span>
</h1>
</body>
</html>
